﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace WJP.Queue.Scheduling
{
    /// <summary>
    /// 调度服务接口
    /// </summary>
    public interface IScheduleService
    {
        /// <summary>
        /// 启动任务
        /// </summary>
        /// <param name="name"></param>
        /// <param name="action"></param>
        /// <param name="dueTime"></param>
        /// <param name="period"></param>
        void StartTask(string name, Action action, int dueTime, int period);

        /// <summary>
        /// 停止任务
        /// </summary>
        /// <param name="name"></param>
        void StopTask(string name);
    }
}
